<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<title><?php echo $title;?></title>
<link href="<?php echo base_url(); ?>assets/public/css/reset.css" media="screen" rel="stylesheet" type="text/css" />
<link href="<?php echo base_url(); ?>assets/public/css/style.css" media="screen" rel="stylesheet" type="text/css" />
<!--[if IE]>
<link href="css/ie.css" media="screen" rel="stylesheet" type="text/css">
<![endif]-->
<?php 
foreach($css_files as $file): ?>
	<link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
<?php endforeach; ?>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/public/js/jquery-1.4.4.min.js"></script>
<?php foreach($js_files as $file): ?>
<script type="text/javascript" src="<?php echo $file; ?>"></script>
<?php endforeach; ?>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/public/js/jquery-tipsy.js"></script>
<script type="text/javascript" src="<?php echo base_url(); ?>assets/public/js/jquery-custom.js"></script>
</head>
<body>
<div class="shadow"></div>
<!-- .shadow -->
 <?php $this->load->view("common/header_view"); ?>
 <?php $this->load->view("common/sidebar_view",$sb);?>
<!-- BEGIN CONTENT -->
<div id="content">
    <div class="box-out">
    	<div class="box-in">
    		<div class="box-head"><h1><?php echo $content_title;?></h1></div>
                <div class="box-content">
                    <!--*********************Layout content********************************-->
                    <div class="form clearfix">
                             <form method="post" action="<?php echo base_url();?>calenders/set_day_process/<?php echo $cal_id; ?>" style="width: 390px;float: left;border-right: 1px solid #E2E4FF;padding-right: 17px">
    					<fieldset>
                                               <?php echo form_error('begin'); ?>
                                               <?php echo form_error('end'); ?>
                                               <input type="hidden" value="1" name="id"/>
                                               <label for="medium_field">Chọn thứ trong tuần</label>
                                               <div class="scrollbox" style="width: 100%">
                                                    <div style="float: left;width: 38%">
    							<div class="odd"><input type="checkbox" name="days[]" value="2"/>Thứ 2</div>
    							<div class="even"><input type="checkbox" name="days[]" value="3"/>Thứ 3</div>
    							<div class="odd"><input type="checkbox" name="days[]" value="4"/>Thứ 4</div>
                                                        <div class="even"><input type="checkbox" name="days[]" value="5"/>Thứ 5</div>
                                                    </div>
                                                    <div style="float: right;width: 40%">
    							<div class="odd"><input type="checkbox" name="days[]" value="6"/>Thứ 6</div>
    							<div class="even"><input type="checkbox" name="days[]" value="7"/>Thứ 7</div>
                                                        <div class="even"> <input type="checkbox" id="multi_select" name="days[]" value="0"/>Chủ nhật</div>
                                                    </div>	 
                                                    <div style="clear: both"></div>		
    						</div>
    						<label for="medium_field">Từ</label>
                                                
    						<input type="text" id="begin" name="begin"  class="text medium"/>
                                                <label for="medium_field">Đến</label>
                                             
    						<input type="text" id="end" name="end" class="text medium"/>                                    
                                                <hr/>
    						<input type="submit" class="submit" value="Lưu lại" name="btn_cld"/> 
    					</fieldset>
    				</form>
                             <div id="workcalender" style="width: 426px;float: right;">
                                 <h3 style=" color: #2B2B2B;display: block;font-size: 14px;font-weight: 700;line-height: 30px;">Thời gian làm việc</h3>
                                 <table>
                                     <tr>
                                         <th>Thứ 2</th>
                                         <th>Thứ 3</th>
                                         <th>Thứ 4</th>
                                         <th>Thứ 5</th>
                                         <th>Thứ 6</th>
                                         <th>Thứ 7</th>
                                         <th>C.nhật</th>
                                     </tr>
                                     <tr style="height: 326px;text-align: center;font-size: 0.8em">
                                         <?php
                                           for($i=2;$i<=7;$i++){  
                                         ?>
                                         <td>
                                             <?php
                                              foreach ($cals[$i] as $cl) {
                                                  echo '<p>Từ '.convert_float_to_hour($cl['begin']).' đến '.convert_float_to_hour($cl['end']).'</p>';
                                              }
                                             ?>
                                         </td>
                                         <?php } ?>
                                         <td>
                                             <?php 
                                               if(isset($cals[0])&&$cals[0]!=null){
                                                   echo '<p>Từ '.convert_float_to_hour($cals[0]['begin']).' đến '.convert_float_to_hour($cals[0]['end']).'</p>'; 
                                               }
                                             ?>
                                         </td>
                                     </tr>
                                 </table>
                             </div>
    			</div>
                    <!--*********************End layout content****************************-->
                </div>
        </div>
    </div>
</div>
<!--- END CONTENT --->
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-8255251-2");
pageTracker._trackPageview();
} catch(err) {}</script>
</body>
</html>